clear

use "final_isq_rep.dta"


*********************
****** Table 2 ******
*********************

regress ln_fdiinstock_mil td_dumt_t1 td_dumc_t1 former_td_t1 ln_pop_t1 ln_gdppc_k00_t1 gdp_growth_t1 gwf_democracy_t1 tradepgdp_t1 totalbits_t1 kaopen_t1 respgdp_t1 trend i.year, cluster(wbcode)


regress ln_fdiinstock_mil i.td_dumall_t1 former_td_t1 ln_pop_t1 ln_gdppc_k00_t1 gdp_growth_t1 gwf_democracy_t1 tradepgdp_t1 totalbits_t1 kaopen_t1 respgdp_t1 trend i.year, cluster(wbcode)

margins td_dumall_t1


regress ln_fdiinstock_mil chall_strong_dum_t1 targ_strong_dum_t1 non_tdcase_t1 ln_pop_t1 ln_gdppc_k00_t1 gdp_growth_t1 gwf_democracy_t1 tradepgdp_t1 totalbits_t1 kaopen_t1 respgdp_t1 trend i.year, cluster(wbcode)


regress ln_fdiinstock_mil i.any_legal_focal_t1 non_tdcase_t1 ln_pop_t1 ln_gdppc_k00_t1 gdp_growth_t1 gwf_democracy_t1 tradepgdp_t1 totalbits_t1 kaopen_t1 respgdp_t1 trend i.year, cluster(wbcode)

margins any_legal_focal_t1



*********************
****** Table 3 ******
*********************


regress ln_fdiinstock_mil sum_t_td_t1 sum_ch_td_t1 former_td_t1 ln_pop_t1 ln_gdppc_k00_t1 gdp_growth_t1 gwf_democracy_t1 tradepgdp_t1 totalbits_t1 kaopen_t1 respgdp_t1 trend i.year, cluster(wbcode)


regress ln_fdiinstock_mil sum_any_td_t1 former_td_t1 ln_pop_t1 ln_gdppc_k00_t1 gdp_growth_t1 gwf_democracy_t1 tradepgdp_t1 totalbits_t1 kaopen_t1 respgdp_t1 trend i.year, cluster(wbcode)


regress ln_fdiinstock_mil chall_strong_m_t1 targ_strong_m_t1 non_tdcase_t1 ln_pop_t1 ln_gdppc_k00_t1 gdp_growth_t1 gwf_democracy_t1 tradepgdp_t1 totalbits_t1 kaopen_t1 respgdp_t1 trend i.year, cluster(wbcode)


regress ln_fdiinstock_mil allstrong_sum_t1 non_tdcase_t1 ln_pop_t1 ln_gdppc_k00_t1 gdp_growth_t1 gwf_democracy_t1 tradepgdp_t1 totalbits_t1 kaopen_t1 respgdp_t1 trend i.year, cluster(wbcode)



*********************
****** Table 4 ******
*********************


regress ln_fdiinstock_mil i.legfoc i.post_settle_all_lf_cl i.post_settle_all sum_p80tdmids never_tdcase ln_pop_t1 ln_gdppc_k00_t1 gdp_growth_t1 gwf_democracy_t1 tradepgdp_t1 totalbits_t1 kaopen_t1 respgdp_t1 ln_anymidyrs_m trend i.year , r

margins legfoc post_settle_all_lf_cl post_settle_all


xtreg ln_fdiinstock_mil legfoc post_settle_all_lf_cl post_settle_all sum_p80tdmids never_tdcase ln_pop_t1 ln_gdppc_k00_t1 gdp_growth_t1 gwf_democracy_t1 tradepgdp_t1 totalbits_t1 kaopen_t1 respgdp_t1 ln_anymidyrs_m trend i.year , r



*******************
***** Table 5 *****
*******************


xtreg ln_fdiinstock_mil  i.pre_settleall_lf_cl i.pre_settleall_nlf_cl sum_any_td ln_pop_t1 ln_gdppc_k00_t1 gdp_growth_t1 gwf_democracy_t1 tradepgdp_t1 totalbits_t1 kaopen_t1 respgdp_t1 ln_anymidyrs_m trend i.year, fe r

margins pre_settleall_lf_cl


xi: xtreg ln_fdiinstock_mil  multdisp#pre_settleall_lf_cl multdisp#pre_settleall_nlf_cl sum_any_td ln_pop_t1 ln_gdppc_k00_t1 gdp_growth_t1 gwf_democracy_t1 tradepgdp_t1 totalbits_t1 kaopen_t1 respgdp_t1 ln_anymidyrs_m trend i.year, fe r

margins multdisp#pre_settleall_lf_cl multdisp#pre_settleall_nlf_cl


xtreg ln_fdiinstock_mil post_settle_all_nlf_cl2 post_settle_all_lf_cl sum_any_td ln_pop_t1 ln_gdppc_k00_t1 gdp_growth_t1 gwf_democracy_t1 tradepgdp_t1 totalbits_t1 kaopen_t1 respgdp_t1 ln_anymidyrs_m trend i.year, fe r


xi: xtreg ln_fdiinstock_mil multdisp#post_settle_all_nlf_cl2 multdisp#post_settle_all_lf_cl sum_any_td ln_pop_t1 ln_gdppc_k00_t1 gdp_growth_t1 gwf_democracy_t1 tradepgdp_t1 totalbits_t1 kaopen_t1 respgdp_t1 ln_anymidyrs_m trend i.year, fe r

margins post_settle_all_nlf_cl2 

margins multdisp#post_settle_all_nlf_cl2 

